package com.imooc.api.controller.admin;

import com.imooc.grance.result.GraceJsonResult;
import com.imooc.pojo.bo.AdminLoginBO;
import com.imooc.pojo.bo.NewAdminBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

/**
 * Created with IntelliJ IDEA.
 *
 * @auther Levi
 * @Date: 2021/03/18/17:16
 * @Description:
 */
@Api(tags = "Admin管理Controller",value = "Admin管理Controller")
@RequestMapping("adminMng")
public interface AdminMngControllerApi {

    @ApiOperation(value = "hello测试接口",notes = "hello测试接口",httpMethod = "POST")
    @PostMapping("/adminLogin")
    public GraceJsonResult adminLogin(@RequestBody @Valid AdminLoginBO adminLoginBO,
                                      HttpServletRequest request, HttpServletResponse response) ;

    @ApiOperation(value = "判断admin的用户名是否已经被注册",notes = "判断admin的用户名是否已经被注册",httpMethod = "POST")
    @PostMapping("/adminIsExist")
    public GraceJsonResult adminIsExist(@RequestParam String username) ;

    @ApiOperation(value = "添加新的admin账号接口",notes = "添加新的admin账号",httpMethod = "POST")
    @PostMapping("/addNewAdmin")
    public GraceJsonResult addNewAdmin(@RequestBody NewAdminBO newAdminBO) ;

    @ApiOperation(value = "分页查询admin列表",notes = "分页查询admin列表",httpMethod = "POST")
    @PostMapping("/getAdminList")
    public GraceJsonResult getAdminList(
            @ApiParam(name = "page",value = "查询第几页的数据",required = false)
            @RequestParam Integer page,
            @ApiParam(name = "pageSize",value = "一页显示多少条数据",required = false)
            @RequestParam Integer pageSize) ;

    @ApiOperation(value = "注销admin账号",notes = "注销admin账号",httpMethod = "POST")
    @PostMapping("/adminLogout")
    public GraceJsonResult adminLogout(@RequestParam String adminId,HttpServletRequest request,
                                 HttpServletResponse response) ;

    @ApiOperation(value = "admin人脸登录接口",notes = "admin人脸登录接口",httpMethod = "POST")
    @PostMapping("/adminFaceLogin")
    public GraceJsonResult adminFaceLogin(@RequestBody AdminLoginBO adminLoginBO,HttpServletRequest request,
                                       HttpServletResponse response) ;
}
